// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "WorldRefLineGraph.h"
#include "iterators/WorldNetIteratorBase.h"

/**
 * Build one or more reference line hermite splines from OpenDRIVE roads.
 */
class FWorldRefLineBuilder
	: public FWorldNetIteratorBase<FWorldRefLineBuilder>
{

public:

	FWorldRefLineBuilder(const FWorldRefLineGraph::Ptr& reflines,
							const FWorldEntityAxis& regionAxis,
							const glm::dmat4x4& parentMat = glm::dmat4x4(1.0));

private:

	void OnReset();
	void OnRoad(const FWorldRoad::Ptr&);

private:

	friend class FWorldNetIteratorBase<FWorldRefLineBuilder>;

	FWorldRefLineGraph::Ptr	_reflines;
	FWorldEntityAxis		_regionAxis;
	glm::dmat4x4			_parentMat;

};
